<?php

namespace App\Http\Requests\Frontend\V10\Users;

use App\Models\UserFaceFailedLog;
use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Validation\Rule;

class UserFaceFailLogRequest extends FormRequest
{
    /**
     * Determine if the user is authorized to make this request.
     *
     * @return bool
     */
    public function authorize()
    {
        return true;
    }

    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        return [
            'type'=>['required',Rule::in([UserFaceFailedLog::TYPE_IDENTIFY_FAILED,UserFaceFailedLog::TYPE_COMPARE_FAILED])],
        ];
    }

    public function messages()
    {
        return [
            'type.required'=>'缺少失败类型',
            'type.in'=>'失败类型不在可用范围',
        ];
    }
}
